from rest_framework.pagination import PageNumberPagination
from rest_framework.pagination import CursorPagination

class MyPageNumberPagination(PageNumberPagination):
    page_size = 15   # default page size
    page_size_query_param = 'size'  # ?page=xx&size=??
    max_page_size = 100 # max page size

class MyArticleCursorPagination(CursorPagination):
    page_size = 3 # Default number of records per age
    page_size_query_param = 'page_size' 
    cursor_query_param = 'cursor' # Default is cursor
    ordering = '-create_date'